import type { ParmasData } from '@/types/global'
import type { HotResult } from '@/types/hot'
import { http } from '@/utils/http'

// 热门推荐接口  封装通用接口
// data里面包括三个参数  page pageSize, subType,用 &添加进去一个新的subType
type queryData = ParmasData & { subType?: string }
export const getHotAPI = (url: string, data?: queryData) => {
  return http<HotResult>({
    method: 'GET',
    url,
    data,
  })
}
// export const getHotAPI = (url:string,data: ParmasData & {subType?:string}) => {
//   return http({
//     method:'GET',
//     url,
//     data
//   })
// }
